<#assign title="文章列表", article="layui-this">
<#include "header.ftl">
    <style>
    /*------公共样式开始------*/
    .layui-inline .layui-form-label {
        width: auto;
    }
    /*------公共样式结束------*/
    /*小屏幕设备*/
    @media (max-width: 767px) {
        /*------显示成果页面中部开始------*/
        /*------显示成果页面中部结束------*/
    }

    /*中大型屏幕设备*/
    @media (min-width: 768px) {
        /*------显示成果页面中部开始------*/
        /*------显示成果页面中部结束------*/
    }

</style>

    <div class="layui-body my-body">
        <div class="layui-card">
            <div class="layui-card-header">文章列表</div>
            <div class="layui-card-body">
                <#-- 搜索框 -->
                <div class="layui-form" lay-filter="article-form">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">标题:</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" placeholder="填写标题" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">内容:</label>
                            <div class="layui-input-block">
                                <input type="text" name="content" placeholder="填写内容" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">发布时间:</label>
                            <div class="layui-input-block">
                                <input type="text" name="checkTime" id="time" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">审核状态:</label>
                            <div class="layui-input-block">
                                <select name="flag">
                                    <option value="">全部</option>
                                    <option value="NO_CHECK">未审核</option>
                                    <option value="IS_CHECK">已通过</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn" lay-submit lay-filter="search-article">搜索</button>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn" lay-submit lay-filter="article-search">重置</button>
                        </div>

                    </div>
                </div>

                <hr class="layui-bg-orange">

                <#-- 数据表格 -->
                <table id="article-table" lay-filter="article-table"></table>
            </div>
        </div>
    </div>

    <#-- 列工具 -->
    <script type="text/html" id="article-bar">
        {{# if (d.flag == 'IS_CHECK') { }}
        <button disabled class="layui-btn layui-btn-xs layui-btn-disabled" lay-event="register">
            <i class="layui-icon layui-icon-ok"></i>同意
        </button>
        <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="notRegister">
            <i class="layui-icon layui-icon-close"></i>否决
        </button>
        {{# } else { }}
        <button class="layui-btn layui-btn-xs" lay-event="register">
            <i class="layui-icon layui-icon-ok"></i>同意
        </button>
        <button disabled class="layui-btn layui-btn-danger layui-btn-xs layui-btn-disabled" lay-event="notRegister">
            <i class="layui-icon layui-icon-close"></i>否决
        </button>
        {{# } }}
        <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">
            <i class="layui-icon layui-icon-delete"></i>删除
        </button>
    </script>

    <#-- 表格工具 -->
    <script type="text/html" id="article-toolbar">
        <button class="layui-btn layui-btn-sm" lay-event="delete">删除选中行</button>
        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="pass">通过选中行</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="notPass">否决选中行</button>
    </script>


    <script>
        layui.extend({
            article: '/js/article'
        }).use(['form', 'article', 'laypage', 'laytpl', 'laydate'], function () {
            var form = layui.form
                , laypage = layui.laypage
                , laytpl = layui.laytpl
                , $ = layui.$
                , laydate = layui.laydate;

            laydate.render({
                elem: '#time'
                , range: true //或 range: '~' 来自定义分割字符
                , max: 0
            })
        })
    </script>
<#include "footer.ftl">